body {
    background: #FAFBFC
}

#app {
    font-family: 'Avenir', Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.chat-service {
    color: #2c3e50;
    box-shadow: 0 0 10px 0 #cacaca;
    width: 50rem;
    max-width: 100%;
    background: #333;
    color: #fff;
    position: fixed;
    transform: translate(-50%, 0);
    margin: 50px 0;
    left: 50%;
    display: flex;
    top: 0px;
    bottom: 0px;
    max-height: 800px;
    min-width: 360px;
}

.box {
    width: 80%;
    height: 100%;
    text-align: center;
    border-right: 1px solid #666;
}

.box.show {
    width: 100%;
}

.users {
    width: 20%;
    height: calc(100% - 37px);
    margin-top: 37px;
    background-color: #333;
    overflow-y: auto;
    box-sizing: border-box;
}

.users::-webkit-scrollbar-track {
    background-color: #eee;
}

.users::-webkit-scrollbar {
    width : 2px;
    background-color: #eee; 
}
            
.users::-webkit-scrollbar-thumb {
    background-color: #666; 
}


.user-name {
    line-height: 40px;
    height: 40px;
    padding: 0 10px;
    cursor: pointer;
    position: relative;
    border-bottom: 1px solid #fff;
}

.user-name img {
    display: inline-block;
    height: 25px;
    width: 25px;
    vertical-align: middle;
    border-radius: 50%;
}

.user-name i {
    font-style: normal;
    display: inline-block;
    max-width: 65%;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0 4px;
    overflow: hidden;
    vertical-align: middle;
}

.user-name em {
    font-size: 12px;
    font-style: normal;
}

.user-name span {
    position: absolute;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    border-radius: 50%;
    background-color: red;
    color: #fff;
    right: 10px;
    top: 50%;
    margin-top: -10px;
    font-size: 12px;
}

.user-name span.close {
    background-color: #666;
    color: #fff;
    border-radius: 10px;
}

.user-name span.close:hover {
    background-color: #333;
}

.user-name.leave {
    background-color: #aaa;
}

.user-name.leave img {
    -webkit-filter: grayscale(100%); /* Chrome, Safari, Opera */
    filter: grayscale(100%);
}

.user-name.active {
    background-color: #57a3f3;
    color: #fff;
}

.clearfix::before,
.clearfix::after {
   content: ""; 
    zoom: 1; 
    visibility: hidden; 
    display : block;
    clear : both;
}
    /*  */

.form-box {
    position: fixed;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    background-color: rgba(0,0,0,.9);
    z-index: 9999;
    text-align: center;
    /* display: none; */
}

.form-box form {
    width: 100%;
    max-width: 300px;
    background-color: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #999;
    padding: 0 20px 20px;
    border-radius: 5px;
}

.form-box form fieldset {
    outline: none;
    border: none;
    font-size: 14px;
}

.form-box form input,
.form-box form select {
    outline: none;
    height: 20px;
    border: 1px solid #ddd;
    vertical-align: middle;
    display: inline-block;
    padding: 5px 10px;
    box-sizing: border-box;
    width: 70%;
    height: 30px;
}

.form-box form button {
    width: 100px;
    background-color: #333;
    cursor: pointer;
    color: #fff;
    outline: none;
    border: none;
    height: 30px;
    margin-top: 10px;
    border-radius: 5px;
}

.title {
    flex-shrink: 0;
    box-sizing: border-box;
    height: 37px;
    line-height: 37px;
}

.title button {
    border: none;
    outline: none;
    background-color: #fff;
    color: #333;
    cursor: pointer;
    margin-left: 10px;
    border-radius: 3px;
    font-size: 12px;
    height: 20px;
}

.title .fr {
    float: right;
    background-color: #57A3F3;
    color: #fff;
    opacity: 0;
    margin: 8px 8px 0;
}

.title .hide {
    position: absolute;
    right: 10%;
    margin-right: -30px;
    top: 8px;
    background-color: #57A3F3;
    color: #fff;
    opacity: 0;
}

.message-list {
    height: calc(100% - 145px - 37px);
    flex: auto;
    background: white;
    overflow: auto;
    box-sizing: border-box;
    padding-bottom: 10px;
}

.message-list::-webkit-scrollbar-track {
    background-color: #eee;
}

.message-list::-webkit-scrollbar {
    width : 2px;
    background-color: #eee; 
}
            
.message-list::-webkit-scrollbar-thumb {
    background-color: #999; 
}


.message-list .message {
    text-align: left;
    padding: .5rem 1rem;
}

.sys-msg {
    text-align: center;
    color: #999;
    font-size: 13px;
    margin: 10px;
}

.sys-msg span {
    color: #00bfff;
}

.message-list .message .user-id {
    color: #00bfff;
    float: left;
    width: 100%;
    text-align: left;
    line-height: 30px;
    margin-bottom: 5px;
}

.message-list .message .user-id em {
    color: #666;
    font-style: normal;
    font-size: 14px
}

.message-list .message .user-id img {
    display: inline-block;
    width: 30px;
    height: 30px;
    vertical-align: middle;
    margin-right: 10px;
    transform: translateY(-3px);
}

.message-list .message .user-id.self {
    text-align: right;
    float: right;
}

.message-list .message .msg {
    margin: .5rem 1rem;
    padding: 8px;
    background: #e6f2ff;
    color: #555;
    border-radius: 4px;
    float: left;
    max-width: 55%;
}

.message-list .message .msg img {
    height: 30px;
    vertical-align: text-bottom;
}

.message-list .message .msg img.img {
    max-width: 100%;
    height: auto;
}

.message-list .message .msg.self {
    float: right;
}

.msg-send {
    flex-shrink: 0;
    display: flex;
    padding: 4px;
    position: relative;
    height: 145px;
}

.msg-send form {
    display: block;
    width: 100%;
}

.msg-send textarea {
    width: 100%;
    box-sizing: border-box;
    border-radius: 4px;
    resize: none;
    padding: 8px 10px;
    outline: none;
    height: 55%;
}

.msg-send button {
    float: right;
    position: absolute;
    bottom: 20px;
    right: 10px;
    margin: 4px 0;
    align-self: flex-end;
    border-radius: 4px;
    border: none;
    background: #57a3f3;
    color: white;
    height: 2rem;
    padding: 0 1.5rem;
    line-height: 2rem;
    cursor: pointer;
    outline: none;
}

.emjoy {
    position: absolute;
    bottom: 28px;
    right: 100px;
    height: 25px;
}

.emjoy-icon {
    display: block;
    height: 100%;
    width: 25px;
    border-radius: 50%;
    border: 1px solid #fff;
    position: relative;
    cursor: pointer;
}

.emjoy-icon i {
    width: 14px;
    height: 14px;
    border-right: 1px solid #fff;
    border-radius: 50%;
    position: absolute;
    bottom: 5px;
    left: 50%;
    margin-left: -7.5px;
    transform: rotate(90deg)
}

.emjoy-icon:before,
.emjoy-icon:after {
    content:  "";
    position: absolute;
    width: 4px;
    height: 4px;
    top: 8px;
    left: 6px;
    border-radius: 50%;
    background-color: #fff;
}

.emjoy-icon:after {
    left: 15px;
}

.emjoy .emjoy-wrap {
    position: absolute;
    bottom: 25px;
    right: 25px;
    border-radius: 5px;
    background-color: #fff;
    width: 384px;
    height: 200px;
    box-shadow: 0 0 10px 0 rgba(0,0,0,.1);
    font-size: 0;
    padding: 10px;
    text-align: left;
}

.emjoy .emjoy-wrap ul {
    padding: 0;
}

.emjoy .emjoy-wrap ul li {
    display: inline-block;
    list-style: none;
    margin: 4px;
    cursor: pointer;
}

.img-mask {
    position: fixed;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    background-color: rgba(0,0,0,.8);
    z-index: 9999;
    text-align: center;
}

.img-mask span {
    position: absolute;
    right: 0px;
    top: 0px;
    font-size: 20px;
    color: #fff;
    width: 50px;
    height: 50px;
    cursor: pointer;
    text-align: center;
    line-height: 50px;
    z-index: 2;
    background-color: rgba(0,0,0,.4);
}

.img-mask img {
    max-width: 100%;
    max-height: 100%;
    position: absolute;
    margin: auto;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
}

.msg-send .pic {
    position: absolute;
    bottom: 25px;
    right: 130px;
    height: 25px;
    width: 100px;
    cursor: pointer;
}

.msg-send .pic input {
    opacity: 0;
    position: absolute;
    left: 0;
    width: 100px;
    cursor: pointer;
}

.msg-send .pic a {
    color: #fff;
    text-decoration: none;
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

@media screen and (max-width: 800px)  {
    .emjoy .emjoy-wrap {
        right: 50%;
        margin-right: -110px;
        bottom: 30px;
        width: 220px;
        height: 150px;
    }

    .emjoy .emjoy-wrap ul li img {
        width: 36px;
    }
}


@media screen and (max-width: 650px) {
    .title .fr,
    .title .hide {
        opacity: 1;
    }

    .chat-service {
        margin: 0;
    }

    .user-name {
        text-align: center;
    }

    .user-name img {
        height: 30px;
        width: auto;
    }

    .user-name i,
    .user-name em {
        display: none;
        max-width: unset;
    }

    .users .user-name:nth-child(1) i {
        display: block;
    }
}